<?php
include 'common/header.html';
include 'common/left.html';
$sql_get_hash = "SELECT hash FROM pft_wx WHERE fid={$_SESSION['sid']} LIMIT 1";
$GLOBALS['le']->query($sql_get_hash);
if (!$GLOBALS['le']->fetch_assoc()) {
    //exit('您还没有绑定公众号');
}
$hash = $GLOBALS['le']->f('hash');
?>
    <link rel="stylesheet" href="http://www.12301.cc/css/aliceui.min.css"/>
	<script src="http://www.12301.cc/js/uploadPreview.js" type="text/javascript"></script>
    <script>
       window.onload = function () { 
            new uploadPreview({ UpBtn: "up_img", DivShow: "imgdiv", ImgShow: "imgShow" });
        }
    </script>
    <div class="main_bd">
        <div class="media_edit_area">
            <form class="ui-form"
                  method="post"
                  action="http://wx.12301.cc/wechat/ichat.php"
                  enctype="multipart/form-data" target="hideFrame">
                <input name="hash" value="<?=$hash?>" type="hidden"/>
                <input name="action" value="SendMsg" type="hidden"/>
                <fieldset>
                    <legend>微信群发消息</legend>
                    <div class="ui-form-item">
                        <label for="" class="ui-label">
                            <span class="ui-form-required">*</span>标题
                        </label>
                        <input class="ui-input" name="title" type="text"> <span class="ui-form-other"></span>
                        <p class="ui-form-explain">标题不能为空且长度不能超过64字。</p>
                    </div>
                    <div class="ui-form-item">
                        <label for="" class="ui-label"> 作者（选填） </label>
                        <input class="ui-input" type="text" name="author"> <span class="ui-form-other"></span>
                        <p class="ui-form-explain">作者不能超过8个字。</p>
                    </div>
                    <div class="ui-form-item">
                        <label for="" class="ui-label"> 摘要（选填） </label>
                        <input class="ui-input" type="text" name="digest"> <span class="ui-form-other"></span>
                        <p class="ui-form-explain">摘要不能超过30个字。</p>
                    </div>
                    <div class="ui-form-item">
                        <label for="" class="ui-label">粉丝分组</label>
                        <select id="fans_group" name="fans_group">
                            <option value="1">ddd</option>
                        </select>
                    </div>
                    <div class="ui-form-item">
                        <label class="ui-label"> 封面 </label>
                        <input type="file" name="image" id="up_img"/>
						<div id="imgdiv"><img id="imgShow" width="300" height="200" /></div>
                       <!--  <input type="button" id="BtnUpload" value="上传" class="ui-button ui-button-swhite"/> -->
                        <p class="ui-form-explain">大图片建议尺寸：900像素 * 500像素</p>
                    </div>
                    <div class="ui-form-item">
                        <label class="ui-label">添加原文链接 </label>
                        <input class="ui-input " id="t_w_250" type="text" name="source_url"/>
                        <p class="ui-form-explain"></p>
                    </div>
                    <div class="ui-form-item">
                        <label for="" class="ui-label"> 正文 </label>
                        <textarea name="content" id="content" class="textarea_w" cols="30" rows="10"></textarea>
                        <p class="ui-form-explain">不能为空且长度不能超过20000字</p>
                    </div>
                    <div class="ui-form-item">
                        <input type="submit" class="ui-button ui-button-lorange btn_primary" value="保存">
                    </div>
                </fieldset>
            </form>
        </div>
    </div>
    <iframe src="about:blank" style="display: none;" id="hideFrame" name="hideFrame" frameborder="0"></iframe>
    <script type="text/javascript" src="js/wxjs.js"></script>
<?php include('common/footer.html')?>